:root {
    --primary-color: #FFD161;
    --secondary-color: #FFC640;
    --text-color: #333333;
    --price-color: #FF6B01;
    --background-color: #F8F8F8;
    --white: #FFFFFF;
    --apple-gray: #86868b;
    --apple-light-gray: #f5f5f7;
    --tech-gradient: linear-gradient(135deg, #f5f7fa 0%, #e4e7eb 100%);
    --tech-pattern: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.8) 0%, rgba(255, 255, 255, 0.1) 100%);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "SF Pro Display", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background: var(--tech-gradient);
    position: relative;
}

/* 添加科技感背景 */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(45deg, rgba(255,255,255,.1) 25%, transparent 25%, transparent 75%, rgba(255,255,255,.1) 75%, rgba(255,255,255,.1)),
        linear-gradient(45deg, rgba(255,255,255,.1) 25%, transparent 25%, transparent 75%, rgba(255,255,255,.1) 75%, rgba(255,255,255,.1));
    background-size: 60px 60px;
    background-position: 0 0, 30px 30px;
    pointer-events: none;
    z-index: -1;
}

/* 添加浮动粒子效果 */
@keyframes float {
    0% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
    100% { transform: translateY(0px) rotate(360deg); }
}

.tech-particle {
    position: fixed;
    width: 4px;
    height: 4px;
    background: rgba(255, 209, 97, 0.2);
    border-radius: 50%;
    pointer-events: none;
    animation: float 15s infinite ease-in-out;
}

/* 添加全局动画效果 */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes addToCart {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

@keyframes slideToCart {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(0.8) translate(calc(var(--end-x) * 0.5), calc(var(--end-y) * 0.5));
        opacity: 0.8;
    }
    100% {
        transform: scale(0.2) translate(var(--end-x), var(--end-y));
        opacity: 0;
    }
}

/* 顶部标语样式 */
.top-banner {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    color: var(--text-color);
    padding: 8px 0;
    text-align: center;
    font-size: 14px;
    font-weight: bold;
    letter-spacing: 1px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.banner-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* 导航栏样式优化 */
.navbar {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 209, 97, 0.2);
    transition: all 0.3s ease;
    margin-top: 100px;
}

.navbar.scrolled {
    box-shadow: 0 2px 20px rgba(0,0,0,0.1);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo img {
    height: 40px;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.logo img:hover {
    transform: scale(1.05);
}

.logo {
    display: flex;
    align-items: center;
    padding: 8px 0;
}

/* 搜索框样式优化 */
.search-bar {
    position: relative;
    display: flex;
    align-items: center;
    flex: 0 1 500px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 8px;
    padding: 0 8px;
    border: 1px solid rgba(255, 209, 97, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.search-bar:focus-within {
    background: var(--white);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.location-icon {
    color: #666;
    margin-right: 8px;
}

.search-bar input {
    flex: 1;
    padding: 8px 12px;
    border: none;
    background: transparent;
    font-size: 14px;
}

.search-bar button {
    background: var(--primary-color);
    border: none;
    color: #333;
    padding: 6px 12px;
    border-radius: 20px;
    cursor: pointer;
}

.nav-buttons {
    display: flex;
    gap: 1rem;
}

.nav-link {
    text-decoration: none;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* 轮播图样式 */
.hero-slider {
    margin-top: 100px;
    position: relative;
    height: 500px;
    overflow: hidden;
    border-radius: 24px;
    overflow: hidden;
    margin: 24px auto;
    max-width: 1400px;
}

.slider-container {
    position: relative;
    height: 100%;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    min-width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.8s ease;
    visibility: hidden;
}

.slide.active {
    opacity: 1;
    visibility: visible;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slide-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: white;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    padding: 32px;
    border-radius: 16px;
}

.slide-content h1 {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 16px;
}

.slider-controls {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
}

.slider-controls button {
    z-index: 2;
    background: rgba(255, 255, 255, 0.8);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.slider-controls button:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: scale(1.1);
}

.slider-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 2;
}

.slider-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.slider-dot.active {
    background: white;
    transform: scale(1.2);
}

/* 产品网格样式 */
.products-grid, .recommendations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* 页面区块通用样式 */
section {
    padding: 4rem 2rem;
}

section h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--primary-color);
}

/* 页脚样式 */
footer {
    background-color: var(--apple-light-gray);
    padding: 64px 32px;
    margin-top: 4rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    padding: 0 1rem;
}

.footer-section {
    padding: 20px;
}

.footer-section h3 {
    color: var(--text-color);
    margin-bottom: 24px;
    font-size: 24px;
    font-weight: 600;
    position: relative;
    display: inline-block;
}

.footer-section h3::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 40px;
    height: 2px;
    background: var(--primary-color);
}

.footer-section p {
    color: var(--apple-gray);
    line-height: 1.8;
    font-size: 15px;
    margin-bottom: 0.5rem;
    text-align: justify;
}

/* 分类导航 */
.category-nav {
    background: var(--white);
    padding: 20px 0;
    margin-top: 88px;
}

.category-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    padding: 0 1rem;
}

.category-item {
    text-decoration: none;
    color: var(--text-color);
    text-align: center;
    transition: transform 0.2s;
}

.category-item:hover {
    transform: translateY(-2px);
}

.category-item img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin-bottom: 8px;
    object-fit: cover;
    border: none;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.category-item:hover img {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border-color: var(--secondary-color);
}

.category-item span {
    display: block;
    color: var(--text-color);
    font-size: 16px;
    font-weight: 500;
    margin-top: 12px;
    transition: color 0.3s ease;
}

.category-item:hover span {
    color: var(--price-color);
}

/* 产品卡片样式优化 */
.product-card {
    background: var(--white);
    border-radius: 18px;
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.15);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    animation: fadeIn 0.6s ease;
}

.product-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 8px 32px rgba(255, 209, 97, 0.3);
}

.product-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    object-position: center;
    transition: transform 0.3s ease;
    border-radius: 12px;
}

.product-card:hover img {
    transform: scale(1.05);
}

.product-card .content {
    padding: 24px;
    background: var(--white);
    position: relative;
}

.product-card .price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 8px 0;
}

.product-card .sold {
    color: #999;
    font-size: 12px;
}

.product-card .description {
    color: #666;
    font-size: 14px;
    margin: 8px 0;
    height: 40px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.product-card h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 12px;
}

.product-card .price {
    color: var(--price-color);
    font-size: 20px;
    font-weight: bold;
    display: flex;
    align-items: baseline;
    gap: 2px;
}

.product-card .price::before {
    content: '¥';
    font-size: 16px;
    font-weight: normal;
}

.product-card button {
    background: var(--primary-color);
    border: none;
    color: #333;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    width: 100%;
    margin-top: 12px;
    font-weight: bold;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.product-card button:hover {
    transform: translateY(-2px);
    background: var(--secondary-color);
}

.product-card button::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.product-card button:active::after {
    width: 200px;
    height: 200px;
    opacity: 0;
}

/* 购物车按钮样式 */
.cart {
    position: relative;
    transition: all 0.3s ease;
}

.cart:hover {
    transform: translateY(-2px);
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--price-color);
    color: white;
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 16px;
    text-align: center;
    animation: addToCart 0.3s ease;
}

/* 区块标题样式 */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 0 1rem;
}

.view-more {
    color: #666;
    text-decoration: none;
    font-size: 14px;
}

.view-more i {
    margin-left: 4px;
}

/* 购物车弹窗样式优化 */
.cart-popup {
    position: fixed;
    top: 80px;
    right: 20px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.15);
    z-index: 1000;
    transform: translateY(-10px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    min-width: 300px;
    max-width: 400px;
    width: 90%;
}

.cart-popup.show {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.cart-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.close-popup {
    cursor: pointer;
    font-size: 24px;
    color: #999;
    transition: all 0.3s ease;
    width: 24px;
    height: 24px;
    line-height: 24px;
    text-align: center;
    border-radius: 50%;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
}

.close-popup:hover {
    color: #333;
    background: #eee;
    transform: scale(1.1);
    background: #ff4d4f;
    color: white;
}

.cart-items {
    max-height: 300px;
    overflow-y: auto;
    padding-right: 10px;
}

/* 自定义滚动条样式 */
.cart-items::-webkit-scrollbar {
    width: 6px;
}

.cart-items::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.cart-items::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 3px;
}

.cart-items::-webkit-scrollbar-thumb:hover {
    background: #ccc;
}

.cart-item {
    display: flex;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f5f5f5;
    animation: fadeIn 0.3s ease;
    position: relative;
}

/* 删除按钮样式 */
.delete-item {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: none;
    background: #f5f5f5;
    color: #999;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    margin-left: 10px;
}

.delete-item:hover {
    background: #ff4d4f;
    color: white;
    transform: scale(1.1);
}

.cart-item img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 4px;
    margin-right: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.cart-item-info {
    flex: 1;
    min-width: 0;
}

.cart-item-info h4 {
    margin: 0 0 4px;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cart-item-price {
    color: var(--price-color);
    font-weight: bold;
    font-size: 16px;
    display: flex;
    align-items: baseline;
    gap: 2px;
}

.cart-item-price::before {
    content: '¥';
    font-size: 14px;
    font-weight: normal;
}

.cart-total {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
    text-align: right;
    font-size: 16px;
    font-weight: bold;
}

/* 结算按钮样式优化 */
.checkout-btn {
    background: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 12px 24px;
    border-radius: 24px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    margin-top: 10px;
    transition: all 0.3s ease;
    width: 100%;
    animation: glow 3s infinite;
}

.checkout-btn:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* 添加到购物车动画元素 */
.add-to-cart-animation {
    position: fixed;
    width: 30px;
    height: 30px;
    background: var(--primary-color);
    border-radius: 50%;
    pointer-events: none;
    z-index: 1000;
    animation: slideToCart 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* 添加到购物车按钮样式 */
.add-to-cart-btn {
    width: 100%;
    padding: 8px 16px;
    background: var(--primary-color);
    border: none;
    border-radius: 20px;
    color: #333;
    font-weight: bold;
    cursor: pointer;
    margin-top: 12px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    animation: glow 3s infinite;
}

.add-to-cart-btn:hover {
    transform: translateY(-2px);
    background: var(--secondary-color);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.add-to-cart-btn i {
    font-size: 14px;
}

/* 推荐卡片样式 */
.recommendation-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.recommendation-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.recommendation-card button {
    width: 100%;
    padding: 8px;
    background: #4CAF50;
    color: white;
    border: none;
    cursor: pointer;
}

/* 使用统一的产品卡片样式 */
.recommendations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    padding: 2rem;
}

.recommendations-grid .product-card {
    animation: fadeIn 0.6s ease;
}

/* 添加删除动画 */
@keyframes removeItem {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    100% {
        transform: scale(0.8);
        opacity: 0;
    }
}

.cart-item.removing {
    animation: removeItem 0.3s ease forwards;
}

/* 添加淡出动画 */
@keyframes fadeOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-10px);
    }
}

/* 响应式调整 */
@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr;
    }
}

/* 添加科技感动画 */
@keyframes glow {
    0% { box-shadow: 0 0 5px rgba(255, 209, 97, 0.2); }
    50% { box-shadow: 0 0 20px rgba(255, 209, 97, 0.4); }
    100% { box-shadow: 0 0 5px rgba(255, 209, 97, 0.2); }
}

/* 总价格样式 */
.total-price .cart-item-price {
    font-size: 18px;
    display: inline-flex;
    align-items: baseline;
    gap: 2px;
} 